@echo off
setlocal

del /q *.exe *.pdb

echo MZ............................................................> t

set CFLAGS=/GS- /GR- /Gy- /nologo /Oi- /O1 /c
set LDFLAGS=/nologo /nodefaultlib /incremental:no /safeseh:no /subsystem:console,5.01 /merge:.rdata=.text /EMITPOGOPHASEINFO /stub:t kernel32.lib user32.lib

cl %CFLAGS% main.c || goto err
link %LDFLAGS% /OUT:windows-console-input-demo.exe main.obj || goto err

del *.obj *.lib *.exp t

exit /b

:err
del *.lib *.exp t

exit /b 1